package com.ohuang.xphook;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;

public class XpInitContentProvider extends android.content.ContentProvider {

    public static final String METE_DATA_NAME = "XpHookInit_Class";
    XpHookInit xpHookInit;

    @Override
    public boolean onCreate() {
        Context context = getContext();
        if (context != null) {
            try {
                String metaDataForApplication = AndroidUtil.INSTANCE.getMetaDataForApplication(context, METE_DATA_NAME);
                if (metaDataForApplication != null) {
                    xpHookInit = (XpHookInit) Class.forName(metaDataForApplication).newInstance();
                    xpHookInit.init(context);
                }
            } catch (Throwable e) {

            }
        }

        return false;
    }

    @Override
    public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {
        return null;
    }

    @Override
    public String getType(Uri uri) {
        return null;
    }

    @Override
    public Uri insert(Uri uri, ContentValues values) {
        return null;
    }

    @Override
    public int delete(Uri uri, String selection, String[] selectionArgs) {
        return 0;
    }

    @Override
    public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
        return 0;
    }
}
